package dfbz.demo01;

public class animalClass {
    String name;
    int age;
    String brand;
    int id;
    public void eat(){
        System.out.println("这是吃的功能");
    }
    public void sleep(){
        System.out.println(id);
        System.out.println("全局变量的id"+id);
        System.out.println("这是吃的功能");
    }
    public void test(){
        int num=10;
        int id=10;
        System.out.println("这是局部变量"+id);
        System.out.println("这是局部变量"+num);
    }
}
